﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObjects.BusinessRules;

namespace BusinessObjects.Production
{
    public class ShipMethod : BusinessObject
    {
        public ShipMethod()
        {
            AddRule(new ValidateRequired("ShipCode"));
            AddRule(new ValidateLength("ShipCode", 0, 20));

            AddRule(new ValidateRequired("ShipName"));
            AddRule(new ValidateLength("ShipName", 0, 255));
        }

        public ShipMethod(string shipMethodId, string shipCode, string shipName, string description, bool isActive)
        {
            ShipMethodID = shipMethodId;
            ShipCode = shipCode;
            ShipName = shipName;
            Description = description;
            IsActive = isActive;
        }

        public string ShipMethodID { get; set; }

        public string ShipCode { get; set; }

        public string ShipName { get; set; }

        public string Description { get; set; }

        public bool IsActive { get; set; }
    }
}
